(DEFUN cl.kl-to-lisp (V14156) (cl.kl-to-lisp-h NIL V14156))
    
(DEFUN cl.kl-to-lisp-h (V4584 V4585)
  (COND ((MEMBER V4585 V4584) V4585)
        ((AND (CONSP V4585)
              (AND (EQ 'type (CAR V4585))
                   (AND (CONSP (CDR V4585))
                        (AND (CONSP (CDR (CDR V4585)))
                             (NULL (CDR (CDR (CDR V4585))))))))
         (cl.kl-to-lisp-h V4584 (CAR (CDR V4585))))
        ((AND (CONSP V4585)
              (AND (EQ 'lambda (CAR V4585))
                   (AND (CONSP (CDR V4585))
                        (AND (CONSP (CDR (CDR V4585)))
                             (AND (NULL (CDR (CDR (CDR V4585))))
                                  (EQ (CAR (CDR V4585)) T))))))
         (cl.kl-to-lisp-h V4584 (cl.rectify-t V4585)))
        ((AND (CONSP V4585)
              (AND (EQ 'lambda (CAR V4585))
                   (AND (CONSP (CDR V4585))
                        (AND (CONSP (CDR (CDR V4585)))
                             (NULL (CDR (CDR (CDR V4585))))))))
         (CONS 'FUNCTION
               (CONS
                (CONS 'LAMBDA
                      (CONS (CONS (CAR (CDR V4585)) NIL)
                            (CONS
                             (cl.kl-to-lisp-h (CONS (CAR (CDR V4585)) V4584)
                                           (CAR (CDR (CDR V4585))))
                             NIL)))
                NIL)))
        ((AND (CONSP V4585)
              (AND (EQ 'let (CAR V4585))
                   (AND (CONSP (CDR V4585))
                        (AND (CONSP (CDR (CDR V4585)))
                             (AND (CONSP (CDR (CDR (CDR V4585))))
                                  (AND (NULL (CDR (CDR (CDR (CDR V4585)))))
                                       (EQ (CAR (CDR V4585)) T)))))))
         (cl.kl-to-lisp-h V4584 (cl.rectify-t V4585)))
        ((AND (CONSP V4585)
              (AND (EQ 'let (CAR V4585))
                   (AND (CONSP (CDR V4585))
                        (AND (CONSP (CDR (CDR V4585)))
                             (AND (CONSP (CDR (CDR (CDR V4585))))
                                  (NULL (CDR (CDR (CDR (CDR V4585))))))))))
         (CONS 'LET
               (CONS
                (CONS
                 (CONS (CAR (CDR V4585))
                       (CONS (cl.kl-to-lisp-h V4584 (CAR (CDR (CDR V4585)))) NIL))
                 NIL)
                (CONS
                 (cl.kl-to-lisp-h (CONS (CAR (CDR V4585)) V4584)
                               (CAR (CDR (CDR (CDR V4585)))))
                 NIL))))
        ((AND (CONSP V4585)
              (AND (EQ 'defun (CAR V4585))
                   (AND (CONSP (CDR V4585))
                        (AND (CONSP (CDR (CDR V4585)))
                             (AND (CONSP (CDR (CDR (CDR V4585))))
                                  (NULL (CDR (CDR (CDR (CDR V4585))))))))))
         (CONS 'DEFUN
               (CONS (CAR (CDR V4585))
                     (CONS (CAR (CDR (CDR V4585)))
                           (CONS
                            (cl.kl-to-lisp-h (CAR (CDR (CDR V4585)))
                                          (CAR (CDR (CDR (CDR V4585)))))
                            NIL)))))
        ((AND (CONSP V4585) (EQ 'cond (CAR V4585)))
         (CONS 'COND
               (MAPCAR #'(LAMBDA (C) (cl.cond-code V4584 C)) (CDR V4585))))
        ((AND (CONSP V4585)
              (OR (MEMBER (CAR V4585) V4584)
                  (CONSP (CAR V4585))))
         (LET ((Lisp (MAPCAR #'(LAMBDA (Y) (cl.kl-to-lisp-h V4584 Y)) V4585)))
           (cl.currylisp Lisp)))
        ((AND (CONSP V4585) (cl.wrapper (cl.fastsymbol? (CAR V4585))))
         (LET ((LispX
                (MAPCAR #'(LAMBDA (Y) (cl.kl-to-lisp-h V4584 Y)) (CDR V4585))))
           (LET ((LispF (cl.maplispsym (CAR V4585))))
             (cl.optimise-application (CONS LispF LispX)))))
        ((OR (NUMBERP V4585) (OR (STRINGP V4585) (NULL V4585))) V4585)
        (T (CONS 'QUOTE (CONS V4585 NIL)))))        
        
(DEFUN cl.rectify-t (V4588) (SUBST (GENSYM "x") T V4588))        

(DEFUN cl.funcall? (F PARAMS) (OR (MEMBER F PARAMS) (CONSP F)))
        
(DEFUN cl.currylisp (V1053)
  (COND
   ((AND (CONSP V1053) (AND (CONSP (CDR V1053)) (CONSP (CDR (CDR V1053)))))
    (cl.currylisp
     (CONS (CONS 'FUNCALL (CONS (CAR V1053) (CONS (CAR (CDR V1053)) NIL)))
           (CDR (CDR V1053)))))
   ((AND (CONSP V1053) (AND (CONSP (CDR V1053)) (NULL (CDR (CDR V1053)))))
    (CONS 'FUNCALL V1053))
   ((AND (CONSP V1053) (NULL (CDR V1053))) (CONS 'FUNCALL (CONS (CAR V1053) NIL)))
   (T V1053)))       
        
(DEFUN cl.optimise-application (V13962)
  (COND
   ((AND (CONSP V13962)
         (AND (EQ 'hd (CAR V13962))
              (AND (CONSP (CDR V13962)) (NULL (CDR (CDR V13962))))))
    (CONS 'CAR (CONS (cl.optimise-application (CAR (CDR V13962))) NIL)))
   ((AND (CONSP V13962)
         (AND (EQ 'tl (CAR V13962))
              (AND (CONSP (CDR V13962)) (NULL (CDR (CDR V13962))))))
    (CONS 'CDR (CONS (cl.optimise-application (CAR (CDR V13962))) NIL)))
   ((AND (CONSP V13962)
         (AND (EQ 'cons (CAR V13962))
              (AND (CONSP (CDR V13962))
                   (AND (CONSP (CDR (CDR V13962)))
                        (NULL (CDR (CDR (CDR V13962))))))))
    (CONS 'CONS
          (CONS (cl.optimise-application (CAR (CDR V13962)))
                (CONS (cl.optimise-application (CAR (CDR (CDR V13962)))) NIL))))
   ((AND (CONSP V13962)
         (AND (EQ 'append (CAR V13962))
              (AND (CONSP (CDR V13962))
                   (AND (CONSP (CDR (CDR V13962)))
                        (NULL (CDR (CDR (CDR V13962))))))))
    (CONS 'APPEND
          (CONS (cl.optimise-application (CAR (CDR V13962)))
                (CONS (cl.optimise-application (CAR (CDR (CDR V13962)))) NIL))))
   ((AND (CONSP V13962)
         (AND (EQ 'reverse (CAR V13962))
              (AND (CONSP (CDR V13962)) (NULL (CDR (CDR V13962))))))
    (CONS 'REVERSE (CONS (cl.optimise-application (CAR (CDR V13962))) NIL)))
   ((AND (CONSP V13962)
         (AND (EQ 'length (CAR V13962))
              (AND (CONSP (CDR V13962)) (NULL (CDR (CDR V13962))))))
    (CONS 'LIST-LENGTH (CONS (cl.optimise-application (CAR (CDR V13962))) NIL)))
   ((AND (CONSP V13962)
         (AND (EQ 'if (CAR V13962))
              (AND (CONSP (CDR V13962))
                   (AND (CONSP (CDR (CDR V13962)))
                        (AND (CONSP (CDR (CDR (CDR V13962))))
                             (NULL (CDR (CDR (CDR (CDR V13962))))))))))
    (CONS 'IF
          (CONS (cl.wrap (CAR (CDR V13962)))
                (CONS (cl.optimise-application (CAR (CDR (CDR V13962))))
                      (CONS
                       (cl.optimise-application (CAR (CDR (CDR (CDR V13962)))))
                       NIL)))))
   ((AND (CONSP V13962)
         (AND (EQ 'value (CAR V13962))
              (AND (CONSP (CDR V13962))
                   (AND (CONSP (CAR (CDR V13962)))
                        (AND (CONSP (CDR (CAR (CDR V13962))))
                             (AND (NULL (CDR (CDR (CAR (CDR V13962)))))
                                  (AND (NULL (CDR (CDR V13962)))
                                       (EQ (CAR (CAR (CDR V13962)))
                                           'QUOTE))))))))
    (CAR (CDR (CAR (CDR V13962)))))
   ((AND (CONSP V13962)
         (AND (EQ '+ (CAR V13962))
              (AND (CONSP (CDR V13962))
                   (AND (cl.ABSEQUAL 1 (CAR (CDR V13962)))
                        (AND (CONSP (CDR (CDR V13962)))
                             (NULL (CDR (CDR (CDR V13962)))))))))
    (CONS '1+
          (CONS (cl.optimise-application (CAR (CDR (CDR V13962)))) NIL)))
   ((AND (CONSP V13962)
         (AND (EQ '+ (CAR V13962))
              (AND (CONSP (CDR V13962))
                   (AND (CONSP (CDR (CDR V13962)))
                        (AND (cl.ABSEQUAL 1 (CAR (CDR (CDR V13962))))
                             (NULL (CDR (CDR (CDR V13962)))))))))
    (CONS '1+ (CONS (cl.optimise-application (CAR (CDR V13962))) NIL)))
   ((AND (CONSP V13962)
         (AND (EQ '- (CAR V13962))
              (AND (CONSP (CDR V13962))
                   (AND (CONSP (CDR (CDR V13962)))
                        (AND (cl.ABSEQUAL 1 (CAR (CDR (CDR V13962))))
                             (NULL (CDR (CDR (CDR V13962)))))))))
    (CONS '1- (CONS (cl.optimise-application (CAR (CDR V13962))) NIL)))
   ((CONSP V13962) (MAPCAR #'(LAMBDA (Z) (cl.optimise-application Z)) V13962))
   (T V13962)))
   
(DEFUN cl.cond-code (V14171 V14172)
  (COND
   ((AND (CONSP V14172) (AND (CONSP (CDR V14172)) (NULL (CDR (CDR V14172)))))
    (LET ((LispTest (cl.wrap (cl.kl-to-lisp-h V14171 (CAR V14172)))))
      (LET ((LispResult (cl.kl-to-lisp-h V14171 (CAR (CDR V14172)))))
        (CONS LispTest (CONS LispResult NIL)))))
   (T (simple-error "implementation error in cl.cond-code"))))
   
(DEFUN cl.wrap (V13314) 
(COND ((AND (CONSP V13314) (AND (CONSP (CDR V13314)) 
        (AND (EQ (QUOTE true) (CAR (CDR V13314))) (AND (NULL (CDR (CDR V13314))) (EQ (CAR V13314) (QUOTE QUOTE)))))) 
       (QUOTE T)) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cons?) (CAR V13314)) 
         (AND (CONSP (CDR V13314)) (NULL (CDR (CDR V13314)))))) 
           (CONS (QUOTE CONSP) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE string?) (CAR V13314)) 
        (AND (CONSP (CDR V13314)) (NULL (CDR (CDR V13314)))))) 
          (CONS (QUOTE STRINGP) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE number?) (CAR V13314)) 
        (AND (CONSP (CDR V13314)) (NULL (CDR (CDR V13314)))))) (CONS (QUOTE NUMBERP) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE empty?) (CAR V13314)) 
        (AND (CONSP (CDR V13314)) (NULL (CDR (CDR V13314)))))) 
          (CONS (QUOTE NULL) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE and) (CAR V13314)) 
        (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) (NULL (CDR (CDR (CDR V13314)))))))) 
        (CONS (QUOTE AND) (CONS (cl.wrap (CAR (CDR V13314))) (CONS (cl.wrap (CAR (CDR (CDR V13314)))) ())))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE or) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) 
         (NULL (CDR (CDR (CDR V13314)))))))) 
       (CONS (QUOTE OR) (CONS (cl.wrap (CAR (CDR V13314))) (CONS (cl.wrap (CAR (CDR (CDR V13314)))) ())))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE not) (CAR V13314)) (AND (CONSP (CDR V13314)) (NULL (CDR (CDR V13314)))))) 
       (CONS (QUOTE NOT) (CONS (cl.wrap (CAR (CDR V13314))) ()))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) 
      (AND (NULL (CAR (CDR (CDR V13314)))) (NULL (CDR (CDR (CDR V13314))))))))) (CONS (QUOTE NULL) (CONS (CAR (CDR V13314)) ()))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (NULL (CAR (CDR V13314))) 
      (AND (CONSP (CDR (CDR V13314))) (NULL (CDR (CDR (CDR V13314))))))))) 
      (CONS (QUOTE NULL) (CDR (CDR V13314)))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) 
      (AND (CONSP (CAR (CDR (CDR V13314)))) (AND (CONSP (CDR (CAR (CDR (CDR V13314))))) (AND (NULL (CDR (CDR (CAR (CDR (CDR V13314)))))) 
      (AND (NULL (CDR (CDR (CDR V13314)))) 
      (AND (EQ (CAR (CAR (CDR (CDR V13314)))) (QUOTE QUOTE)) 
      (cl.wrapper (cl.fastsymbol? (CAR (CDR (CAR (CDR (CDR V13314)))))))))))))))) (CONS (QUOTE EQ) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CAR (CDR V13314))) 
      (AND (CONSP (CDR (CAR (CDR V13314)))) (AND (NULL (CDR (CDR (CAR (CDR V13314))))) (AND (CONSP (CDR (CDR V13314))) 
      (AND (NULL (CDR (CDR (CDR V13314)))) (AND (EQ (CAR (CAR (CDR V13314))) (QUOTE QUOTE)) 
      (cl.wrapper (cl.fastsymbol? (CAR (CDR (CAR (CDR V13314))))))))))))))) 
      (CONS (QUOTE EQ) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CAR (CDR V13314))) 
      (AND (EQ (QUOTE fail) (CAR (CAR (CDR V13314)))) (AND (NULL (CDR (CAR (CDR V13314)))) (AND (CONSP (CDR (CDR V13314))) 
      (NULL (CDR (CDR (CDR V13314))))))))))) 
      (CONS (QUOTE EQ) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) 
      (AND (CONSP (CAR (CDR (CDR V13314)))) (AND (EQ (QUOTE fail) (CAR (CAR (CDR (CDR V13314))))) (AND (NULL (CDR (CAR (CDR (CDR V13314))))) 
      (NULL (CDR (CDR (CDR V13314))))))))))) (CONS (QUOTE EQ) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) 
      (AND (NULL (CDR (CDR (CDR V13314)))) (STRINGP (CAR (CDR V13314)))))))) 
      (CONS (QUOTE EQUAL) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) 
      (AND (NULL (CDR (CDR (CDR V13314)))) (STRINGP (CAR (CDR (CDR V13314))))))))) (CONS (QUOTE EQUAL) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) 
      (AND (CONSP (CDR (CDR V13314))) (AND (NULL (CDR (CDR (CDR V13314)))) (NUMBERP (CAR (CDR V13314)))))))) 
      (CONS (QUOTE EQUALP) (CDR V13314))) ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) (AND (CONSP (CDR V13314)) 
      (AND (CONSP (CDR (CDR V13314))) (AND (NULL (CDR (CDR (CDR V13314)))) (NUMBERP (CAR (CDR (CDR V13314))))))))) 
      (CONS (QUOTE EQUALP) (CDR V13314))) ((AND (CONSP V13314) (AND (EQ (QUOTE cl.equal?) (CAR V13314)) 
      (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) (NULL (CDR (CDR (CDR V13314)))))))) 
      (CONS (QUOTE cl.ABSEQUAL) (CDR V13314))) ((AND (CONSP V13314) (AND (EQ (QUOTE cl.greater?) (CAR V13314)) 
      (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) (NULL (CDR (CDR (CDR V13314)))))))) (CONS (QUOTE >) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.greater-than-or-equal-to?) (CAR V13314)) (AND (CONSP (CDR V13314)) 
      (AND (CONSP (CDR (CDR V13314))) (NULL (CDR (CDR (CDR V13314)))))))) (CONS (QUOTE >=) (CDR V13314))) 
      ((AND (CONSP V13314) (AND (EQ (QUOTE cl.less?) (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) 
      (NULL (CDR (CDR (CDR V13314)))))))) (CONS (QUOTE <) (CDR V13314))) ((AND (CONSP V13314) (AND (EQ (QUOTE cl.less-than-or-equal-to?) 
      (CAR V13314)) (AND (CONSP (CDR V13314)) (AND (CONSP (CDR (CDR V13314))) (NULL (CDR (CDR (CDR V13314)))))))) 
      (CONS (QUOTE <=) (CDR V13314))) 
      (T (CONS (QUOTE cl.wrapper) (CONS V13314 ()))))) 
   
(DEFUN cl.wrapper (V14179)
  (COND ((EQ 'true V14179) T) 
        ((EQ 'false V14179) NIL)
        (T (simple-error "boolean expected"))))
        
(DEFUN cl.fastsymbol? (V14177)
  (COND ((CONSP V14177) 'false)
        ((NULL V14177) 'false)
        ((STRINGP V14177) 'false)
        ((NUMBERP V14177) 'false)
        (T 'true))) 
                   
(DEFUN cl.maplispsym (V14181)
  (COND ((EQ '= V14181) 'cl.equal?) 
        ((EQ '> V14181) 'cl.greater?)
        ((EQ '< V14181) 'cl.less?) 
        ((EQ '>= V14181) 'cl.greater-than-or-equal-to?)
        ((EQ '<= V14181) 'cl.less-than-or-equal-to?) 
        ((EQ '+ V14181) 'cl.add)
        ((EQ '- V14181) 'cl.subtract) 
        ((EQ '/ V14181) 'cl.divide)
        ((EQ '* V14181) 'cl.multiply) 
        (T V14181)))